package bishi;

import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/8/26 21:03
 * @Version 1.0
 */
public class Huawei01 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] str = sc.nextLine().split(" ");
        int n = str.length;
        long[] nums = new long[n];
        for(int i=0;i<n;i++){
            nums[i]=Long.parseLong(str[i]);
        }
        //先完成第一步，把每个整数的奇偶bit为互换
        for(int i=0;i<n;i++){
            long temp = nums[i];
            nums[i]=((temp&0xaaaaaaaa)>>>1)+((temp&0x55555555)<<1);
        }//打印试一下
        //System.out.println(nums[0]);
        long[] low=new long[n];
        long[] high = new long[n];
        long[] ans = new long[n];
        for(int i=0;i<n;i++){
            low[i]=nums[i];
            high[i]=nums[(i+1)%n];
            ans[i] = (low[i]>>>2)+((high[i]&3)<<30);
        }
        for(int i=0;i<n;i++)
            System.out.print(ans[i]+" ");
    }
}
